package com.happyass.show.dao;


import com.happyass.show.entity.Plan;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * TODO
 *
 * @author admin
 * @date 2021/1/4 19:28
 *
 * <P></P>
 **/

@Repository
public interface PlanDao extends PagingAndSortingRepository<Plan,Integer>,JpaRepository<Plan,Integer> {

    Plan findByPlanItem(@Param("planItem") String planItem);
    Page<Plan> findByPlanItem(@Param("planItem") String planItem, Pageable pageable);
    Page<Plan> findByPlanItemContainingAndPlanDel(@Param("planItem") String planItem, Integer planDel,Pageable pageable);


    Plan findByPlanStatus(@Param("planStatus") Integer planStatus);
    Page<Plan> findByPlanStatus(@Param("planStatus") Integer planStatus, Pageable pageable);

    Page<Plan> findByPlanStatusAndPlanDel(@Param("planStatus") Integer planStatus, @Param("planDel") Integer planDel, Pageable pageable);
}
